package com.infore.qualityControl.export.policy.strategy.concreteStrategy;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.infore.qualityControl.export.policy.bo.ExportParamBo;
import com.infore.qualityControl.export.policy.strategy.Strategy;
import com.infore.qualityControl.export.util.ExportUtil;
import com.infore.qualityControl.service.ITestDataService;
import com.infore.qualityControl.util.ObjectMapperUtil;
import com.infore.qualityControl.util.ResultEntity;

@Service("INTEGRATED_INTERVENTION_DATA")
public class IntegratedInterventionStrategy implements Strategy {

	@Autowired
	ITestDataService ITestDataService;

	@Autowired
	ObjectMapperUtil ObjectMapperUtil;

	@Override
	public byte[] doExcelStrategy(List<Map<String, Object>> list, ExportParamBo exportParamBo) throws Exception {
		ResultEntity resultEntity = ITestDataService.integratedInterventionData(exportParamBo.getQualityParamSelectBo(),
				exportParamBo.getPageObject());
		return ExportUtil.exportSpecialExcel(exportParamBo.getRequest(), exportParamBo.getHeaderProp(),
				exportParamBo.getPattern(), exportParamBo.getTableType(), resultEntity);
	}

    @Override
    public byte[] doPdfStrategy(List<Map<String, Object>> list, ExportParamBo exportParamBo) throws Exception {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public byte[] doWordStrategy(List<Map<String, Object>> list, ExportParamBo exportParamBo) throws Exception {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public List<Map<String, Object>> doData(List<Map<String, Object>> list, ExportParamBo exportParamBo) throws Exception {
        // TODO Auto-generated method stub
        return null;
    }

}
